package com.albaba.designpattern.proxy.text_002;

import com.albaba.designpattern.proxy.text_001.IUserDao;
import com.albaba.designpattern.proxy.text_001.UserDaoImpl;

/**
 * @Description: TODO
 * @Author zx
 * @Date 2025/2/20 13:50
 * @Version 1.0
 */
public class TextProxy {

    public static void main(String[] args) {
        IUserDao userDao = new UserDaoImpl();
        System.out.println(userDao.getClass());

        IUserDao proxy = (IUserDao) new ProxyFactory(userDao).getProxyInstance();
        System.out.println(proxy.getClass());
        proxy.save();

    }
}
